/*
 * @Author: zjian 2549608114@qq.com
 * @Date: 2024-05-11 10:45:35
 * @LastEditors: zjian 2549608114@qq.com
 * @LastEditTime: 2024-05-11 10:51:41
 * @FilePath: \code-print\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push (location) {
    return originalPush.call(this, location).catch((err) => err)
}

const routes = [
    {
        path: '/',
        component: () => import('../layout/index.vue'),
        children: [
            {
                path: '/',
                name: 'Home',
                component: () => import('../views/home.vue'),
            }
        ]
    },
]

const router = new VueRouter({
    routes
})

export default router
